<?php
$model = $this->listing->model;
$carType = $this->listing->cartype;
?>
<dl class="detail">
	<dt>Detail:</dt>
    <dd>
	    <?php if (!empty($this->listing->area_l2)):?>
        <?php $distric_name = $this->listing->area_l2->name;?>
            <a href="<?php echo Ac_Util::getCrossLink($this->listing->area_l2, 'area_l2');?>"><?php echo $distric_name?></a><?php echo ', ';?>
        <?php endif;?>

    	<?php 
	    $to_add     = '';
    	$to_add1    = '';
	    $to_add2    = '';
    	if (!empty($this->listing->make)){ ?>
	        <a href="<?php echo Ac_Util::getCrossLink($this->listing->make->name, 'make_car');?>">
		        <?php echo $this->listing->make->name;?></a><?php 
        	$to_add = ', ';
	    } 
    	if (!empty($this->listing->model)){ 
	    	echo $to_add . (string)$this->listing->model->name;
		    $to_add1 = ', ';
        } 
        if (!empty($this->listing->yearmanufactured)) {
	    	echo $to_add1 . (int)$this->listing->yearmanufactured;
		    $to_add2 = ', ';
    	}
        if (!empty($this->listing->cartype)) { 
		    echo $to_add2 . $carType;
	    }?>
	</dd>
</dl>

<?php if (!empty($this->listing->sold)): ?>
    <dl class="price">
    	<dt><?php echo $this->t('Price')?>:</dt>
	    <dd><?php echo $this->t('Sold');?></dd>
    </dl>
<?php elseif (!empty($this->listing->is_free)): ?>
    <dl class="price">
    	<dt><?php echo $this->t('Price')?>:</dt>
	    <dd><?php echo $this->t('Free');?></dd>
    </dl>
<?php elseif (!empty($this->listing->is_contact)): ?>
    <dl class="price">
	    <dt><?php echo $this->t('Price')?>:</dt>
    	<dd><?php echo $this->t('Please contact');?></dd>
    </dl>
<?php else: ?>
    <?php if (!empty($this->listing->price)): ?>
        <dl class="price">
        	<dd><?php echo $this->t('HKD __1__', null, number_format($this->listing->price));?></dd>
        </dl>
    <?php endif; ?>
<?php endif; ?>
